﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	测压井观测（每月）
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="dolphincontainer">
	    <div id="dolphinnav">
	        <ul class="top_tab">
                <li><a href="/Record/StackWater/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>水位及水质</span></a></li>
                <li><a href="/Record/BackWater/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>进浆及回水</span></a></li>
                <li><a href="/Record/Settle/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>沉降及位移</span></a></li>
                <li><a href="/Record/Ardealite/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>磷石膏堆积坝</span></a></li>
                <li><a href="/Record/Ditch/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>截洪沟</span></a></li>
                <li><a href="javascript:return(false);" class="current"><span>浸润线观测</span></a></li>
                <li><a href="/Record/PiezometerBase/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>渗压观测</span></a></li>
                <li><a href="/Record/Drain/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>导渗系统</span></a></li>
	        </ul>
	    </div>
	</div>

    <%
           bool result = (bool)ViewData["success"];
           if(result){ 
        %>
           <div class="tips_area">测压井数据更新成功</div>
        <%
        }
        %>

    <% using (Html.BeginForm())
    {
         List<Piezometer_well_base_info> wells = (List<Piezometer_well_base_info>)ViewData["wells"];
         List<Piezometer_well_monthly_info> wellsRecord = (List<Piezometer_well_monthly_info>)ViewData["wellsRecord"];
    %>

        <%= Html.ValidationSummary(true) %>
        <%= Html.Hidden("stack_id", ViewData["id"])%>
        <%= Html.Hidden("factoryId", ViewData["factoryId"]) %>
        <%= Html.Hidden("date", (DateTime)ViewData["date"])%>
            
     <%
           DateTime date = (DateTime)ViewData["date"];
       %>     
    
    <table cellpadding="4" cellspacing="0" class="com_from_table" style="width:756px;">
        <tr>
            <th colspan="2">测压井（每月 - <%= date.Year%>年<%=date.Month%>月）</th>
        </tr>
        
        <tr>
            <td class="lab" style="width:138px;">测量人员：</td>
            <td style="width:608px;">
                <%= Html.DropDownList("tester_id", ViewData["users"] as List<SelectListItem>, "请选择", new { style = "width:150px" })%>
            </td>
        </tr>

        <tr>
            <td class="lab">查看测压井位置：</td>
            <td>
                <%if (!string.IsNullOrEmpty((string)ViewData["piezometerWellPic"])){ %><a href="<%=Url.Content((string)ViewData["piezometerWellPic"]) %>" target="_blank">测压井位置图</a><%} %>
            </td>
        </tr>

        <tr>
            <td colspan="2">
                
                <table cellpadding="4" cellspacing="0" border="0" class="subtable3">
                    <tr>
                        <th style="width:134px; text-align:center;">测压井编号</th>
                        <th style="width:100px;">孔顶标高（米）</th>
                        <th style="width:100px;">孔底标高（米）</th>
                        <th style="width:188px;">孔顶标高与井中水位高差（米）</th>
                        <th style="width:200px;">说明</th>
                    </tr>

                    <%
                        if (wells != null & wells.Count > 0)
                        {
                            for (int i = 0; i < wells.Count; i++)
                            {
                                bool hasRecord = wellsRecord != null && wellsRecord.Count > i;
                    %>

                    <tr>
                        <td style="text-align:center;"><%=wells[i].piezometer_well_id%></td>
                        <td><%=wells[i].well_top_El%></td>
                        <td><%=wells[i].Well_bottom_El%></td>
                        <td><input type="text" size="5" value="<%=hasRecord ? (wellsRecord[i].Height_difference.HasValue ? wellsRecord[i].Height_difference.Value.ToString() : ""): ""%>" name="Height_difference<%=i+1 %>" /></td>
                        <td><input type="text" size="24" value="<%=hasRecord ? wellsRecord[i].Remarks : ""%>" name="Remarks<%=i+1 %>" /></td>
                    </tr>

                    <%
                            }
                        }
                    %>

                </table>
                

            </td>
        </tr>

    </table>
    
    <div class="submit_btn_area" style="margin-left:148px;">
        <input type="submit" value="提 交" />
    </div>

    <% } %>


</asp:Content>
